package com.tensquare.qa.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.tensquare.qa.pojo.Reply;

import org.springframework.data.domain.Pageable;
import java.util.List;

/**
 * 回答的数据访问接口
 * @author Administrator
 *
 */
public interface ReplyDao extends JpaRepository<Reply,String>,JpaSpecificationExecutor<Reply>{
    /**
     * 根据问题id查询回答列表
     * @param problemId
     * @return
     */
	public List<Reply> findAllByProblemid(String problemId);

    /**
     * 根据用户id查询我的回答列表
     * @param userId
     * @return
     */
	public Page<Reply> findAllByUserid(String userId, Pageable pageable);
}
